package java编程思想.第05章.初始化顺序;

class Mug {
	public Mug(int m) {
		System.out.println("Mug:" + m);
	}

	void f(int m) {
		System.out.println("f:" + m);
	}

}

public class Mugs {
	static Mug mug1;
	Mug mug2;
	{
		System.out.println(mug1);
		mug1 = new Mug(1);
		mug2 = new Mug(2);
		System.out.println("mug1&mug2 initialized");
	}

	static {
		mug1 = new Mug(1);
	}

	public Mugs() {
		System.out.println("Mugs()");
	}

	Mugs(int i) {
		System.out.println("Mugs(int)");
	}

	public static void main(String[] args) {
		System.out.println("main()");
		new Mugs();
		System.out.println("111");
		new Mugs(1);
		System.out.println("222");
	}

}
